#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#


import shelve

# db = shelve.open("db.txt")
# db["xiong"] = {"username": "xiong", "pwd": 123456}
# print(dir(db))
# db.close()

db = shelve.open("db.txt", writeback=True)
db["xiong"]["pwd"] = 654321
print(db["xiong"])
db.close()
